package com.elitesland.demo.controller.backend.entity;

import com.elitesland.core.base.BaseModel;
import com.elitesland.system.annotation.Comment;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Objects;

/**
 * 销售单明细表,商品明细
 */
@Entity
@Table(name = "sod")
@org.hibernate.annotations.Table(appliesTo = "sod", comment = "销售单明细表,商品明细")
@Data
@DynamicInsert
@DynamicUpdate
@Accessors(chain = true)
@ApiModel(value = "SOD", description = "销售单明细表,商品明细")
@EqualsAndHashCode(callSuper=true)
public class SodDO extends BaseModel implements Serializable
{


    @ApiModelProperty("行号")
    @Comment("行号")
    @Column()
    Double lineNo;

    @ApiModelProperty("品项编号")
    @Comment("品项编号")
    @Column(length = 40 )
    String itemCode;

    @ApiModelProperty("品项名称")
    @Comment("品项名称")
    @Column(length = 100 )
    String itemName;

    @ApiModelProperty("数量")
    @Comment("数量")
    @Column()
    Double qty;

    @ApiModelProperty("基价")
    @Comment("基价")
    @Column()
    Double basePrice;

    @ApiModelProperty("含税单个价格")
    @Comment("含税单个价格")
    @Column()
    Double price;

    @ApiModelProperty("不含税单个价格")
    @Comment("不含税单个价格")
    @Column()
    Double netPrice;

    @ApiModelProperty("税率")
    @Comment("税率")
    @Column()
    Double taxRate;

    @ApiModelProperty("单个价格税额")
    @Comment("单个价格税额")
    @Column(precision = 20, scale = 2)
    BigDecimal taxAmt;

    @ApiModelProperty("含税总金额")
    @Comment("含税总金额")
    @Column(precision = 20, scale = 2)
    BigDecimal amt;

    @ApiModelProperty("不含税总金额")
    @Comment("不含税总金额")
    @Column(precision = 20, scale = 2)
    BigDecimal netAmt;



}

